#include <allegro.h>
#include "Clock.h"
#include "WindowManager.h"
#include "MapManager.h"

#define WINDOW_WIDTH 450
#define WINDOW_HEIGHT 330

Clock *interval;

void tick()
{
	interval->tick();
}

int main()
{
	allegro_init();
	install_keyboard();
	
	set_color_depth(32);
	set_gfx_mode(GFX_AUTODETECT_WINDOWED, WINDOW_WIDTH, WINDOW_HEIGHT,50,100);
	
	WindowManager::init();
	
	MapManager *mapManager = MapManager::getInstance();
	
	interval = new Clock(mapManager->tankOne, mapManager->tankTwo);
	install_timer();
	install_int_ex(tick, BPS_TO_TIMER(100));
	
	while(WindowManager::ifNotClosed())
	{
		
	}

	return 0;
}END_OF_MAIN()
